home *** CD-ROM | disk | FTP | other *** search
/ PD ROM 1 / PD ROM Volume I - Macintosh Software from BMUG (1988).iso / Stacks / Hyper Education / Organizational Aids / ClassRoom Aids / SetUpStack / card_2846.txt < prev    next >
Encoding:
Text File  |  1987-12-24  |  6.6 KB  |  278 lines

  1. -- card: 2846 from stack: in
  2. -- bmap block id: 6744
  3. -- flags: 4000
  4. -- background id: 2754
  5. -- name: Configuration
  6.  
  7.  
  8. -- part 3 (button)
  9. -- low flags: 00
  10. -- high flags: 8003
  11. -- rect: left=382 top=128 right=156 bottom=464
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 0 / 0
  14. -- text alignment: 1
  15. -- font id: 0
  16. -- text size: 12
  17. -- style flags: 0
  18. -- line height: 16
  19. -- part name: Configure
  20. ----- HyperTalk script -----
  21. on mouseUp
  22.   global NumStudents,A,B,C,D,ClassName, period
  23.   put card field "B" into B
  24.   put card field "A" into A
  25.   put card field "C" into C
  26.   put card field "D" into D
  27.   Answer "Configure all classes?" with "OK" or "Cancel"
  28.   if it is "Cancel" then exit mouseUp
  29.   put number of lines in card field "Title" into numClasses
  30.   repeat with x = 1 to numClasses
  31.     go to setupstack
  32.     go to card "configuration" of setupstack
  33.     put line x of card field "NumStudents" into NumStudents
  34.     put line x of card field "Title" into ClassName
  35.     put line x of card field "Period" into period
  36.     if x > 1 and x < numClasses then
  37.       answer "Configure next class?" with "OK" or "Cancel"
  38.       if it is "Cancel" then exit mouseUp
  39.     end if
  40.     doSeatingChart
  41.     answer "This may take a few minutes..."
  42.     set lockscreen to true
  43.     set cursor to 4
  44.     doProfiles
  45.     doGrades
  46.     doAttendance
  47.     set lockscreen to false
  48.   end repeat
  49.   go to first card
  50. end mouseUp
  51.  
  52. on doSeatingChart
  53.   global ClassName, period, numStudents,stackname
  54.   go to card "ClassListTemplate"
  55.   doMenu "Copy Card"
  56.   doMenu "New Stack..."
  57.   get the name of this stack
  58.   put word 2 of it into stackname
  59.   set name of this card to "SeatingChart"
  60.   put period into bkgnd field "Period"
  61.   put ClassName into bkgnd field "Class"
  62.   repeat with z = 2 to 36
  63.     set the script of field z to the script of field 1
  64.   end repeat
  65.   put 1 into counter
  66.   repeat with x = 0 to 5
  67.     repeat with y = 1 to 6
  68.       if counter > numStudents then exit doSeatingChart
  69.       put "Who sits in row" && x+1 && "and seat" && y & "?" into myquest
  70.       ask myquest
  71.       if word 1 of it is not empty then put counter + 1 into counter
  72.       put x * 6 + y into seat
  73.       put word 1 of it & return & word 2 of it into field seat
  74.     end repeat
  75.   end repeat
  76.   put tempScript into the script of field "date"
  77. end doSeatingChart
  78.  
  79. on DoProfiles
  80.   global ClassName, Period,A,B,C,D,stackname
  81.   go to card "ProfileTemplate" of SetUpStack
  82.   doMenu "Copy Card"
  83.   repeat with x = 1 to 36
  84.     go to last card of stackname
  85.     put word 1 of field x of card "SeatingChart" into temp1
  86.     put word 2 of field x of card "SeatingChart" into temp2
  87.     if temp1 is empty then
  88.       next repeat
  89.     end if
  90.     doMenu "Paste Card"
  91.     put A into card field "A"
  92.     put B into card field "B"
  93.     put C into card field "C"
  94.     put D into card field "D"
  95.     put temp1 && temp2 into field "Name"
  96.     put char 1 of temp1 & temp2 & "Profile" into cardname
  97.     get name of this card
  98.     set name of this card to cardname
  99.   end repeat
  100. end DoProfiles
  101.  
  102. on DoGrades
  103.   global ClassName, Period,stackname
  104.   go to card "GradesTemplate" of SetUpStack
  105.   doMenu "Copy Card"
  106.   repeat with x = 1 to 36
  107.     go to last card of stackname
  108.     put word 1 of field x of card "SeatingChart" into temp1
  109.     put word 2 of field x of card "SeatingChart" into temp2
  110.     if temp1 is empty then
  111.       next repeat
  112.     end if
  113.     doMenu "Paste Card"
  114.     put temp1 && temp2 into field "Name"
  115.     put char 1 of temp1 & temp2 & "Grades" into cardname
  116.     set name of this card to cardname
  117.     put ClassName into card field "Class"
  118.     put Period into card field "Period"
  119.   end repeat
  120. end DoGrades
  121.  
  122. on DoAttendance
  123.   global ClassName, period,stackname
  124.   go to card "AttendanceTemplate" of SetUpStack
  125.   doMenu "Copy Card"
  126.   repeat with x = 1 to 36
  127.     go to last card of stackname
  128.     put word 1 of field x of card "SeatingChart" into temp1
  129.     put word 2 of field x of card "SeatingChart" into temp2
  130.     if temp1 is empty then
  131.       next repeat
  132.     end if
  133.     doMenu "Paste Card"
  134.     put temp1 && temp2 into card field "Name"
  135.     put char 1 of temp1 & temp2 & "Attendance" into cardname
  136.     set name of this card to cardname
  137.     put ClassName into card field "Class"
  138.     put period into card field "Period"
  139.   end repeat
  140.   put "Your class record is now complete" into msg
  141. end DoAttendance
  142.  
  143.  
  144.  
  145.  
  146.  
  147. -- part 4 (field)
  148. -- low flags: 00
  149. -- high flags: 0004
  150. -- rect: left=59 top=115 right=230 bottom=201
  151. -- title width / last selected line: 0
  152. -- icon id / first selected line: 0 / 0
  153. -- text alignment: 0
  154. -- font id: 3
  155. -- text size: 12
  156. -- style flags: 0
  157. -- line height: 16
  158. -- part name: Title
  159.  
  160.  
  161. -- part 5 (field)
  162. -- low flags: 00
  163. -- high flags: 0004
  164. -- rect: left=214 top=115 right=231 bottom=244
  165. -- title width / last selected line: 0
  166. -- icon id / first selected line: 0 / 0
  167. -- text alignment: 0
  168. -- font id: 3
  169. -- text size: 12
  170. -- style flags: 0
  171. -- line height: 16
  172. -- part name: Period
  173.  
  174.  
  175. -- part 11 (field)
  176. -- low flags: 00
  177. -- high flags: 0004
  178. -- rect: left=267 top=115 right=231 bottom=310
  179. -- title width / last selected line: 0
  180. -- icon id / first selected line: 0 / 0
  181. -- text alignment: 0
  182. -- font id: 3
  183. -- text size: 12
  184. -- style flags: 0
  185. -- line height: 16
  186. -- part name: NumStudents
  187.  
  188.  
  189. -- part 12 (field)
  190. -- low flags: 00
  191. -- high flags: 4000
  192. -- rect: left=58 top=255 right=305 bottom=101
  193. -- title width / last selected line: 0
  194. -- icon id / first selected line: 0 / 0
  195. -- text alignment: 0
  196. -- font id: 3
  197. -- text size: 12
  198. -- style flags: 0
  199. -- line height: 16
  200. -- part name: A
  201.  
  202.  
  203. -- part 13 (field)
  204. -- low flags: 00
  205. -- high flags: 4000
  206. -- rect: left=120 top=255 right=305 bottom=166
  207. -- title width / last selected line: 0
  208. -- icon id / first selected line: 0 / 0
  209. -- text alignment: 0
  210. -- font id: 3
  211. -- text size: 12
  212. -- style flags: 0
  213. -- line height: 16
  214. -- part name: B
  215.  
  216.  
  217. -- part 14 (field)
  218. -- low flags: 00
  219. -- high flags: 4000
  220. -- rect: left=184 top=255 right=305 bottom=229
  221. -- title width / last selected line: 0
  222. -- icon id / first selected line: 0 / 0
  223. -- text alignment: 0
  224. -- font id: 3
  225. -- text size: 12
  226. -- style flags: 0
  227. -- line height: 16
  228. -- part name: C
  229.  
  230.  
  231. -- part 15 (field)
  232. -- low flags: 00
  233. -- high flags: 4000
  234. -- rect: left=254 top=255 right=305 bottom=301
  235. -- title width / last selected line: 0
  236. -- icon id / first selected line: 0 / 0
  237. -- text alignment: 0
  238. -- font id: 3
  239. -- text size: 12
  240. -- style flags: 0
  241. -- line height: 16
  242. -- part name: D
  243.  
  244.  
  245. -- part contents for card part 4
  246. ----- text -----
  247. Your class here
  248.  
  249.  
  250. -- part contents for card part 5
  251. ----- text -----
  252.  
  253.  
  254.  
  255. -- part contents for card part 12
  256. ----- text -----
  257. 97.5
  258. 92.5
  259. 90.0
  260.  
  261. -- part contents for card part 13
  262. ----- text -----
  263. 87.5
  264. 82.5
  265. 80.0
  266. 77.5
  267.  
  268. -- part contents for card part 14
  269. ----- text -----
  270. 77.5
  271. 72.5
  272. 70.0
  273.  
  274. -- part contents for card part 15
  275. ----- text -----
  276. 67.5
  277. 62.5
  278. 60.0